/*
 * @FilePath: \gzt_admin\src\api\account.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request';

// 用户列表
export const userList = params => request({
    url: '/users/list',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 用户添加
export const userAdd = params => request({
    url: '/users/add',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 用户编辑
export const userUpdate = params => request({
    url: '/users/update',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 开启关闭
export const updateCheckDevice = params => request({
    url: '/users/updateCheckDevice',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 重置密码
export const resetUserPasswd = params => request({
    url: '/users/resetUserPasswd',
    method: 'POST',
    data: params
}).then(res => {
    return res;
});
// 用户启用、禁用
export const enableUser = params => request({
    url: '/users/enableUser',
    method: 'POST',
    params
}).then(res => {
    return res;
});
// 用户删除
export const deleteUser = params => request({
    url: '/users/deleteUser',
    method: 'POST',
    params
}).then(res => {
    return res;
});
// 用户详情
export const ueserDetail = params => request({
    url: '/users/detail',
    method: 'GET',
    params
});
// 获取用户有权限查看的菜单列表
export const usersMenuList = params => request({
    url: '/users/menuList',
    method: 'GET',
    params
});
